package com.xnyzc.lhy.mis.controller.cmsapi.message;


import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.param.message.OaSysMessagePushParam;
import com.xnyzc.lhy.mis.service.message.IOaSysMessagePushService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 后台管理 Push消息表 前端控制器
 * </p>
 *
 * @author cuixiaojian
 * @since 2019-11-09
 */
@RestController
@Api(value = "Push消息", tags = {"Push消息推送"})
@RequestMapping("/cmsapi/messagePush")
public class OaSysMessagePushController {
    @Autowired
    private IOaSysMessagePushService iOaSysMessagePushService;

    /**
     * 添加Push消息
     * */
    @ApiOperation(value = "添加Push消息", notes = "添加Push消息")
    @PostMapping(value = "/addMessagePushInfo")
    public Rv addMessagePushInfo(@RequestBody OaSysMessagePushParam oaSysMessagePushParam){
        return iOaSysMessagePushService.addMessagePushInfo(oaSysMessagePushParam);
    }

    /**
     * 查询Push消息
     * */
    @ApiOperation(value = "查询Push消息", notes = "查询Push消息")
    @PostMapping(value = "/queryMessagePushInfo")
    public Rv queryMessagePushInfo(Long current,Long pageSize){
        return iOaSysMessagePushService.queryMessagePushInfo(current,pageSize);
    }

}
